<?php
// +----------------------------------------------------------------------
// | Amicool-MVC [ Dynamic Flexible Agile Devlepment]
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2020 http://amicool.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 郡笑笙 <iamzjs@126.com>
// +----------------------------------------------------------------------
class VideoTypeModel extends Model
{   
    function __Construct(){
		parent::__Construct();
		$this->mod = 'videotype';
	}
	function fetchAll($condition=' where 1=1'){
		return $this->_fetchAll($this->mod,$condition);
	}
	function fetchOne($id){
		return $this->_fetchOne($this->mod,'tid',$id);
	}
	function add(){
		$data=array(
			'videoname'=>$_POST['typename']
			);
		return $this->_add($this->mod,$data);
	}
	function update(){
		$data=array(
			'videoname'=>$_POST['typename']
			);
		$where = "tid=".$_POST['tid'];
		return $this->_update($this->mod,$data,$where);
	}
	function delete(){
		$where = "tid=".$_GET['tid'];
		return $this->_delete($this->mod,$where);
	}
}
?>